3.1.52 \(\int \sinh (c+d x) (a+b \tanh ^3(c+d x)) \, dx\) [52]

Optimal. Leaf size=63 \[ -\frac {3 b \text {ArcTan}(\sinh (c+d x))}{2 d}+\frac {a \cosh (c+d x)}{d}+\frac {3 b \sinh (c+d x)}{2 d}-\frac {b \sinh (c+d x) \tanh ^2(c+d x)}{2 d} \]

[Out]

-3/2*b*arctan(sinh(d*x+c))/d+a*cosh(d*x+c)/d+3/2*b*sinh(d*x+c)/d-1/2*b*sinh(d*x+c)*tanh(d*x+c)^2/d

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {3747, 2718, 2672, 294, 327, 209} \begin {gather*} \frac {a \cosh (c+d x)}{d}-\frac {3 b \text {ArcTan}(\sinh (c+d x))}{2 d}+\frac {3 b \sinh (c+d x)}{2 d}-\frac {b \sinh (c+d x) \tanh ^2(c+d x)}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sinh[c + d*x]*(a + b*Tanh[c + d*x]^3),x]

[Out]

(-3*b*ArcTan[Sinh[c + d*x]])/(2*d) + (a*Cosh[c + d*x])/d + (3*b*Sinh[c + d*x])/(2*d) - (b*Sinh[c + d*x]*Tanh[c
 + d*x]^2)/(2*d)

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 294

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^
n)^(p + 1)/(b*n*(p + 1))), x] - Dist[c^n*((m - n + 1)/(b*n*(p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2672

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> With[{ff = FreeFactors[S
in[e + f*x], x]}, Dist[ff/f, Subst[Int[(ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, a*(Sin[e + f*x]/ff)
], x]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3747

Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> Int[ExpandTrig[(d*sin[e + f*x])^m*(a + b*(c*tan[e + f*x])^n)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n},
x] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int \sinh (c+d x) \left (a+b \tanh ^3(c+d x)\right ) \, dx &=-\left (i \int \left (i a \sinh (c+d x)+i b \sinh (c+d x) \tanh ^3(c+d x)\right ) \, dx\right )\\ &=a \int \sinh (c+d x) \, dx+b \int \sinh (c+d x) \tanh ^3(c+d x) \, dx\\ &=\frac {a \cosh (c+d x)}{d}+\frac {b \text {Subst}\left (\int \frac {x^4}{\left (1+x^2\right )^2} \, dx,x,\sinh (c+d x)\right )}{d}\\ &=\frac {a \cosh (c+d x)}{d}-\frac {b \sinh (c+d x) \tanh ^2(c+d x)}{2 d}+\frac {(3 b) \text {Subst}\left (\int \frac {x^2}{1+x^2} \, dx,x,\sinh (c+d x)\right )}{2 d}\\ &=\frac {a \cosh (c+d x)}{d}+\frac {3 b \sinh (c+d x)}{2 d}-\frac {b \sinh (c+d x) \tanh ^2(c+d x)}{2 d}-\frac {(3 b) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sinh (c+d x)\right )}{2 d}\\ &=-\frac {3 b \tan ^{-1}(\sinh (c+d x))}{2 d}+\frac {a \cosh (c+d x)}{d}+\frac {3 b \sinh (c+d x)}{2 d}-\frac {b \sinh (c+d x) \tanh ^2(c+d x)}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 72, normalized size = 1.14 \begin {gather*} \frac {a \cosh (c) \cosh (d x)}{d}+\frac {a \sinh (c) \sinh (d x)}{d}+\frac {b \sinh (c+d x) \tanh ^2(c+d x)}{d}-\frac {3 b (\text {ArcTan}(\sinh (c+d x))-\text {sech}(c+d x) \tanh (c+d x))}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sinh[c + d*x]*(a + b*Tanh[c + d*x]^3),x]

[Out]

(a*Cosh[c]*Cosh[d*x])/d + (a*Sinh[c]*Sinh[d*x])/d + (b*Sinh[c + d*x]*Tanh[c + d*x]^2)/d - (3*b*(ArcTan[Sinh[c
+ d*x]] - Sech[c + d*x]*Tanh[c + d*x]))/(2*d)

________________________________________________________________________________________

Maple [C] Result contains complex when optimal does not.
time = 2.19, size = 125, normalized size = 1.98

method result size
risch \(\frac {a \,{\mathrm e}^{d x +c}}{2 d}+\frac {b \,{\mathrm e}^{d x +c}}{2 d}+\frac {{\mathrm e}^{-d x -c} a}{2 d}-\frac {{\mathrm e}^{-d x -c} b}{2 d}+\frac {b \,{\mathrm e}^{d x +c} \left ({\mathrm e}^{2 d x +2 c}-1\right )}{d \left (1+{\mathrm e}^{2 d x +2 c}\right )^{2}}+\frac {3 i b \ln \left ({\mathrm e}^{d x +c}-i\right )}{2 d}-\frac {3 i b \ln \left ({\mathrm e}^{d x +c}+i\right )}{2 d}\) \(125\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(d*x+c)*(a+b*tanh(d*x+c)^3),x,method=_RETURNVERBOSE)

[Out]

1/2*a/d*exp(d*x+c)+1/2*b/d*exp(d*x+c)+1/2/d*exp(-d*x-c)*a-1/2/d*exp(-d*x-c)*b+b*exp(d*x+c)*(exp(2*d*x+2*c)-1)/
d/(1+exp(2*d*x+2*c))^2+3/2*I*b/d*ln(exp(d*x+c)-I)-3/2*I*b/d*ln(exp(d*x+c)+I)

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 105, normalized size = 1.67 \begin {gather*} \frac {1}{2} \, b {\left (\frac {6 \, \arctan \left (e^{\left (-d x - c\right )}\right )}{d} - \frac {e^{\left (-d x - c\right )}}{d} + \frac {4 \, e^{\left (-2 \, d x - 2 \, c\right )} - e^{\left (-4 \, d x - 4 \, c\right )} + 1}{d {\left (e^{\left (-d x - c\right )} + 2 \, e^{\left (-3 \, d x - 3 \, c\right )} + e^{\left (-5 \, d x - 5 \, c\right )}\right )}}\right )} + \frac {a \cosh \left (d x + c\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)*(a+b*tanh(d*x+c)^3),x, algorithm="maxima")

[Out]

1/2*b*(6*arctan(e^(-d*x - c))/d - e^(-d*x - c)/d + (4*e^(-2*d*x - 2*c) - e^(-4*d*x - 4*c) + 1)/(d*(e^(-d*x - c
) + 2*e^(-3*d*x - 3*c) + e^(-5*d*x - 5*c)))) + a*cosh(d*x + c)/d

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 528 vs. \(2 (57) = 114\).
time = 0.35, size = 528, normalized size = 8.38 \begin {gather*} \frac {{\left (a + b\right )} \cosh \left (d x + c\right )^{6} + 6 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{5} + {\left (a + b\right )} \sinh \left (d x + c\right )^{6} + 3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{4} + 3 \, {\left (5 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} + a + b\right )} \sinh \left (d x + c\right )^{4} + 4 \, {\left (5 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{3} + 3 \, {\left (a + b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{3} + 3 \, {\left (a - b\right )} \cosh \left (d x + c\right )^{2} + 3 \, {\left (5 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{4} + 6 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} + a - b\right )} \sinh \left (d x + c\right )^{2} - 6 \, {\left (b \cosh \left (d x + c\right )^{5} + 5 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{4} + b \sinh \left (d x + c\right )^{5} + 2 \, b \cosh \left (d x + c\right )^{3} + 2 \, {\left (5 \, b \cosh \left (d x + c\right )^{2} + b\right )} \sinh \left (d x + c\right )^{3} + 2 \, {\left (5 \, b \cosh \left (d x + c\right )^{3} + 3 \, b \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + b \cosh \left (d x + c\right ) + {\left (5 \, b \cosh \left (d x + c\right )^{4} + 6 \, b \cosh \left (d x + c\right )^{2} + b\right )} \sinh \left (d x + c\right )\right )} \arctan \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right ) + 6 \, {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{5} + 2 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{3} + {\left (a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + a - b}{2 \, {\left (d \cosh \left (d x + c\right )^{5} + 5 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{4} + d \sinh \left (d x + c\right )^{5} + 2 \, d \cosh \left (d x + c\right )^{3} + 2 \, {\left (5 \, d \cosh \left (d x + c\right )^{2} + d\right )} \sinh \left (d x + c\right )^{3} + 2 \, {\left (5 \, d \cosh \left (d x + c\right )^{3} + 3 \, d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + d \cosh \left (d x + c\right ) + {\left (5 \, d \cosh \left (d x + c\right )^{4} + 6 \, d \cosh \left (d x + c\right )^{2} + d\right )} \sinh \left (d x + c\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)*(a+b*tanh(d*x+c)^3),x, algorithm="fricas")

[Out]

1/2*((a + b)*cosh(d*x + c)^6 + 6*(a + b)*cosh(d*x + c)*sinh(d*x + c)^5 + (a + b)*sinh(d*x + c)^6 + 3*(a + b)*c
osh(d*x + c)^4 + 3*(5*(a + b)*cosh(d*x + c)^2 + a + b)*sinh(d*x + c)^4 + 4*(5*(a + b)*cosh(d*x + c)^3 + 3*(a +
 b)*cosh(d*x + c))*sinh(d*x + c)^3 + 3*(a - b)*cosh(d*x + c)^2 + 3*(5*(a + b)*cosh(d*x + c)^4 + 6*(a + b)*cosh
(d*x + c)^2 + a - b)*sinh(d*x + c)^2 - 6*(b*cosh(d*x + c)^5 + 5*b*cosh(d*x + c)*sinh(d*x + c)^4 + b*sinh(d*x +
 c)^5 + 2*b*cosh(d*x + c)^3 + 2*(5*b*cosh(d*x + c)^2 + b)*sinh(d*x + c)^3 + 2*(5*b*cosh(d*x + c)^3 + 3*b*cosh(
d*x + c))*sinh(d*x + c)^2 + b*cosh(d*x + c) + (5*b*cosh(d*x + c)^4 + 6*b*cosh(d*x + c)^2 + b)*sinh(d*x + c))*a
rctan(cosh(d*x + c) + sinh(d*x + c)) + 6*((a + b)*cosh(d*x + c)^5 + 2*(a + b)*cosh(d*x + c)^3 + (a - b)*cosh(d
*x + c))*sinh(d*x + c) + a - b)/(d*cosh(d*x + c)^5 + 5*d*cosh(d*x + c)*sinh(d*x + c)^4 + d*sinh(d*x + c)^5 + 2
*d*cosh(d*x + c)^3 + 2*(5*d*cosh(d*x + c)^2 + d)*sinh(d*x + c)^3 + 2*(5*d*cosh(d*x + c)^3 + 3*d*cosh(d*x + c))
*sinh(d*x + c)^2 + d*cosh(d*x + c) + (5*d*cosh(d*x + c)^4 + 6*d*cosh(d*x + c)^2 + d)*sinh(d*x + c))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tanh ^{3}{\left (c + d x \right )}\right ) \sinh {\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)*(a+b*tanh(d*x+c)**3),x)

[Out]

Integral((a + b*tanh(c + d*x)**3)*sinh(c + d*x), x)

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 86, normalized size = 1.37 \begin {gather*} -\frac {6 \, b \arctan \left (e^{\left (d x + c\right )}\right ) - a e^{\left (d x + c\right )} - b e^{\left (d x + c\right )} - {\left (a - b\right )} e^{\left (-d x - c\right )} - \frac {2 \, {\left (b e^{\left (3 \, d x + 3 \, c\right )} - b e^{\left (d x + c\right )}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{2}}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)*(a+b*tanh(d*x+c)^3),x, algorithm="giac")

[Out]

-1/2*(6*b*arctan(e^(d*x + c)) - a*e^(d*x + c) - b*e^(d*x + c) - (a - b)*e^(-d*x - c) - 2*(b*e^(3*d*x + 3*c) -
b*e^(d*x + c))/(e^(2*d*x + 2*c) + 1)^2)/d

________________________________________________________________________________________

Mupad [B]
time = 0.14, size = 128, normalized size = 2.03 \begin {gather*} \frac {{\mathrm {e}}^{-c-d\,x}\,\left (a-b\right )}{2\,d}-\frac {3\,\mathrm {atan}\left (\frac {b\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\sqrt {d^2}}{d\,\sqrt {b^2}}\right )\,\sqrt {b^2}}{\sqrt {d^2}}+\frac {{\mathrm {e}}^{c+d\,x}\,\left (a+b\right )}{2\,d}+\frac {b\,{\mathrm {e}}^{c+d\,x}}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {2\,b\,{\mathrm {e}}^{c+d\,x}}{d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(c + d*x)*(a + b*tanh(c + d*x)^3),x)

[Out]

(exp(- c - d*x)*(a - b))/(2*d) - (3*atan((b*exp(d*x)*exp(c)*(d^2)^(1/2))/(d*(b^2)^(1/2)))*(b^2)^(1/2))/(d^2)^(
1/2) + (exp(c + d*x)*(a + b))/(2*d) + (b*exp(c + d*x))/(d*(exp(2*c + 2*d*x) + 1)) - (2*b*exp(c + d*x))/(d*(2*e
xp(2*c + 2*d*x) + exp(4*c + 4*d*x) + 1))

________________________________________________________________________________________